FINERACT-2354: Re-aging:- Accrual and Accrual Activity handling - Default Handling#5245
Merged
adamsaghy merged 2 commits intoapache:developfrom Jan 15, 2026
Conversation
0c6592e to
9fb0aeb
Compare
9fb0aeb to
7281e99
Compare
Contributor
|
@mariiaKraievska Please rebase |
Aman-Mittal
reviewed
Dec 27, 2025
| private void calculateAccrualActivity(LoanTransaction loanTransaction, MonetaryCurrency currency, | ||
| List<LoanRepaymentScheduleInstallment> installments) { | ||
|
|
||
| private boolean calculateAccrualActivity(LoanTransaction loanTransaction, MonetaryCurrency currency, |
Contributor
There was a problem hiding this comment.
This function has cognitive complexity of 27, it should be broken down to smaller functions
galovics
approved these changes
Dec 29, 2025
7281e99 to
81450a0
Compare
81450a0 to
a8762c4
Compare
Aman-Mittal
approved these changes
Jan 5, 2026
Contributor
Aman-Mittal
left a comment
There was a problem hiding this comment.
On Technical Level Seems OK
a8762c4 to
1fd4ade
Compare
1fd4ade to
98691af
Compare
adamsaghy
reviewed
Jan 8, 2026
|
|
||
| @Override | ||
| public void recalculateAccrualActivityTransaction(Loan loan, ChangedTransactionDetail changedTransactionDetail) { | ||
| public void recalculateAccrualActivityTransaction(Loan loan, ChangedTransactionDetail changedTransactionDetail, |
Contributor
There was a problem hiding this comment.
Let's rework it without loan transactions argument and without reaging handling.
Accrual activities should be compared only with loan installments.
adamsaghy
reviewed
Jan 8, 2026
| throw new IllegalStateException("Expected an AdvancedPaymentScheduleTransactionProcessor"); | ||
| } | ||
| if (installment.isAdditional() || installment.isDownPayment() || installment.isReAged()) { | ||
| if (installment.isAdditional() || installment.isDownPayment() || (installment.isReAged() && loanReAgeParameter != null |
Contributor
There was a problem hiding this comment.
//TODO: Remove installment.isReAged() once EQUAL AMORTIZATION is implemented
adamsaghy
reviewed
Jan 8, 2026
| final LoanTransaction reAgeTransaction = loan.findReAgeTransaction(); | ||
| final LoanReAgeParameter loanReAgeParameter = reAgeTransaction != null ? reAgeTransaction.getLoanReAgeParameter() : null; | ||
|
|
||
| if (installment.isAdditional() || (installment.isReAged() && loanReAgeParameter != null |
Contributor
There was a problem hiding this comment.
//TODO: Remove installment.isReAged() once EQUAL AMORTIZATION is implemented
a06684e to
62a711b
Compare
62a711b to
34c1802
Compare
Contributor
Author
|
@adamsaghy PTAL |
Contributor
What does PTAL mean? :) |
Contributor
Author
Please take another look :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.